package com.wisezone.studentmanger.util;

import java.util.List;

import com.wisezone.studentmanger.model.UserMessage;

public class Utils {
	/**
	 * 根据sessionID在用户信息列表中查找用户
	 * 
	 * @param userLists
	 * @param sessionId
	 * @return
	 */
	public static UserMessage getUserMessageByList(List<UserMessage> userLists, String sessionId) {
		UserMessage u = null;
		for (UserMessage user : userLists) {
			String sId = user.getSessionId();
			if (sId.equals(sessionId)) {
				u = user;
				break;
			}
		}
		return u;
	}
}
